package com.colin.service;

import com.colin.dao.GuestMapper;
import com.colin.pojo.Guest;
import com.colin.pojo.GuestList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class GuestServiceImpl implements GuestService{
    @Autowired
    private GuestMapper guestMapper;

    public void setGuestMapper(GuestMapper guestMapper) {
        this.guestMapper = guestMapper;
    }

    @Override
    public int addGuest(Guest guest) {
        return guestMapper.addGuest(guest);
    }

    @Override
    public List<GuestList> queryAllGuest(Map map) {
        return guestMapper.queryAllGuest(map);
    }

    @Override
    public int deleteGuest(int id) {
        return guestMapper.deleteGuest(id);
    }

    @Override
    public GuestList queryGuestById(int id) {
        return guestMapper.queryGuestById(id);
    }
}
